package com.eistert.java.datastructure._14_AVL;

import com.eistert.java.datastructure._07_Set._07_Set;

public class _14_AVLSet<E extends Comparable<E>> implements _07_Set<E> {

    private _14_AVLTree<E, Object> avl;

    public _14_AVLSet() {
        avl = new _14_AVLTree<>();
    }

    @Override
    public int getSize() {
        return avl.getSize();
    }

    @Override
    public boolean isEmpty() {
        return avl.isEmpty();
    }

    @Override
    public void add(E e) {
        avl.add(e, null);
    }

    @Override
    public boolean contains(E e) {
        return avl.contains(e);
    }

    @Override
    public void remove(E e) {
        avl.remove(e);
    }
}
